import request from '@/utils/request'
let lawServicePlatform = "lawServicePlatform";

// 资质证照

// 分页展示
export function getQualificationCertificateByPage(data) {
    return request({
        //   const {}=  data;
        url: lawServicePlatform + "/qualificationCertificate/getQualificationCertificateByPage",
        method: 'post',
        data
    })
}

// 模糊查询
export function selectQualificationCertificateByName(data) {
    return request({
        //   const {}=  data;
        url: lawServicePlatform + "/qualificationCertificate/selectQualificationCertificateByName?name=" + data.name,
        method: 'get',
        // data
    })
}

// 根据id和查看详情
export function selectQualificationCertificateById(data) {
    return request({
        //   const {}=  data;
        url: lawServicePlatform + "/qualificationCertificate/selectQualificationCertificateById?id=" + data.id,
        method: 'get',
        data
    })
}

// 根据实体类进行购买（对应后端代码会自己寻找已保存的id和token之类的，前端不需要关心这个，按要求传格式就好）
// export function buyQualificationCertificate(data) {
//     return request({
//         url: lawServicePlatform + "/qualificationCertificate/buyQualificationCertificate",
//         method: 'post',
//         data
//     })
// }
// 会传回来一个{"error":"未提供token"}


// 通过名称分页查询上线的资质证照
export function buyQualificationCertificate(name, pageNum, pageSize) {
    return request({
        url: "/lawServicePlatform/qualificationCertificate/getQualificationCertificateByName?name=" + name + "&pageNum=" + pageNum + "&pageSize=" + pageSize,
        method: 'post',
    })
}